package com.greenant.store.bean;

import java.util.Date;

import com.avos.avoscloud.AVACL;
import com.avos.avoscloud.AVClassName;

@AVClassName(AntAVObject.CLASS_WITHDRAWRECORD)
public class WithdrawRecord extends AntAVObject {

	public static final String ATTR_time = "time";
	public static final String ATTR_status = "status";
	public static final String ATTR_userId = "userId";
	public static final String ATTR_userName = "userName";
	public static final String ATTR_withdraw = "withdraw";

	public WithdrawRecord() {
		super();
		setAccessCtrl();
	}

	public WithdrawRecord(String str) {
		super(str);
		setAccessCtrl();
	}

	public WithdrawRecord getInstance() {
		return this;
	}

	public String getUserId() {
		return this.getString(ATTR_userId);
	}

	public void setUserId(String userId) {
		this.put(ATTR_userId, userId);
	}

	public void setUserName(String userName) {
		this.put(ATTR_userName, userName);
	}

	public String getUserName() {
		return this.getString(ATTR_userName);
	}

	public Date getTime() {
		return this.getDate(ATTR_time);
	}

	public int getStatus() {
		return this.getInt(ATTR_status);
	}

	public void setStatus(int status) {
		this.put(ATTR_status, status);
	}
	
	public double getWithdraw() {
		return this.getDouble(ATTR_withdraw);
	}

	public void setWithdraw(double withdraw) {
		this.put(ATTR_withdraw, withdraw);
	}

	private int setAccessCtrl() {

		acl = new AVACL();
		acl.setPublicReadAccess(true);
		acl.setPublicWriteAccess(true);
		this.setACL(acl);

		return 0;
	}

}
